|
|
|
| Table 12.3 Color Properties of the MonthView | | Name | Description | | ForeColor | Controls the color of the days of the month and the horizontal line beneath the week labels. | | TrailingForeColor | Determines the color of the days that are outside the months currently being displayed but still visible on the screen. Trailing days on a normal calendar often appear as empty space at the end of the month. | | MonthBackColor | Controls the background area behind the days of the month, but not including the title. | | TitleBackColor | Controls the color of the area behind the month name. | | TitleForeColor | Sets the color of the text used to display the month name. |
|
|
|
|
|
|
Displaying Multiple Months |
|
|
|
|
|
|
|
|
If you want to display more than one month at a time using the MonthView control, you can set the MonthRows and MonthCols properties. For example, Figure 12.22 shows a MonthView control with both of these properties set to a value of 2, creating a grid. |
|
|
|
|
|
|
|
|
Figure 12.22
The MonthView control is not limited
to displaying a single month at a time. |
|
|
|
|
CAUTION
|
|
|
|
|
You cannot display more than 12 months on the screen at one time. Attempting to do so causes an error. |
|
|
|
|
|
|
|
|
|
|
For even more flexibility, you can set the MonthRows and MonthCols properties at runtime, allowing the users to choose dynamically how much of the calendar they want to view. Note that the size of the MonthView control is not user scalable. In other words, the 2×2 grid shown in Figure 12.22 always has a fixed size. If you change the size of the grid at runtime, the MonthView control automatically expands and contracts to the new size. Therefore, knowing the new size beforehand would be nice. Fortunately, the MonthView control offers a method |
|
|
|
|
|